package com.example.czxyuser.mapper;

import com.yc.czxy.Mapper.BaseMapper;
import com.yc.czxy.bean.user;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @program: chengzixy
 * @description:
 * @author:
 * @create: 2021-08-30 15:57
 */
@Mapper
public interface UserMapper extends BaseMapper<user> {

    @Select("select * from user \n" +
            "where username=#{user.username} and password=#{user.password}")
    user selectForLogin(@Param("user") user user);

    @Insert("insert into user(username,password,email) value(?,?,?)")
    int insertuser(user user);

}
